import { ref } from "vue";
import { defineStore } from "pinia";
import { adminUser } from "./identity";

export const usePublicStore = defineStore("public", () => {
  const isEnglish = ref(true);
  const isLogin = ref(false);
  const AdminUser = ref(adminUser);
  function changeLanguage() {
    isEnglish.value = !isEnglish.value;
  }
  function changeAdminUser(adminUser:any) {
    AdminUser.value=adminUser
  }
  function changeLogin(login:boolean) {
    isLogin.value =login;
  }
  return { changeLanguage, isEnglish, isLogin, changeLogin,changeAdminUser,AdminUser };
});
